package com.splant.android.smart.SystemDefinedLevel.AutoStartApp;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.splant.android.smart.UILevel.Main_Activity;

/**
 * Created by Administrator on 2015/9/25.
 */
public class StartReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {

        if (intent.getAction().equalsIgnoreCase("install_and_start")) {
            Intent intent2 = new Intent(context,Main_Activity.class);
            intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//注意,不能少
            context.startActivity(intent2);
        }
    }

}
